﻿@functions {

}

@functions {
    Random _rand = new Random();
    private int RandomInt() {
        return _rand.Next();
    }
}

Here's a random number: @RandomInt()